<template>
    <div class="use-props-parent">
        <UseProps  ref="childRef" />
        <button @click="getRef">点击获取Ref</button>
    </div>
</template>

<script setup lang="ts" name="UsePropsParent">
import  {type  Persons } from '@/types/';
import UseProps from './UseProps.vue';
import { reactive,ref } from 'vue';


const childRef = ref(null);

let lists = reactive<Persons>([
    {
        id:'111',
        name:'小百度',
        age:19
    },
    {
        id:'232',
        name:'小珏',
        age:20
    }
])

const getRef = () =>{
    console.log(childRef.value,'childRef');
}



</script>
